#!/bin/sh

# export LD_PRELOAD=/usr/lib/libdebugger.so

# set mdp/kernel log level:2
echo logu-99-2 > /proc/mdp/mbase
echo logk-99-2 > /proc/mdp/mbase
echo logu-1-7 > /proc/mdp/mbase
echo logu-2-7 > /proc/mdp/mbase
echo logu-3-7 > /proc/mdp/mbase
echo logu-4-7 > /proc/mdp/mbase
echo logu-5-7 > /proc/mdp/mbase
echo logu-7-7 > /proc/mdp/mbase
echo logu-19-7 > /proc/mdp/mbase
echo logu-20-7 > /proc/mdp/mbase


if `cat /proc/cmdline | grep 'root=/dev/mmc' > /dev/null`
then
    log_size=10240
else
    log_size=1024
fi

if `cat /proc/cmdline | grep 'mtdparts=' > /dev/null`
then
    echo "No space left for log"
else
    logcat -s *:W -v time -r$log_size -f "/data/log/logcat.log" &
fi

if [ -f /data/pre_run.sh ]; then
    /bin/sh /data/pre_run.sh &
fi

# easycam &

